<h3 id="Count-the-occurrence-of-keys-and-convert-the-result-into-array-of-objects-where-each-object-belongs-to-one-key-and-it’s-occurrence-count"><a href="#Count-the-occurrence-of-keys-and-convert-the-result-into-array-of-objects-where-each-object-belongs-to-one-key-and-it’s-occurrence-count" class="headerlink" title="Count the occurrence of keys and convert the result into array of objects where each object belongs to one key and it’s occurrence (count)."></a>Count the occurrence of keys and convert the result into array of objects where each object belongs to one key and it’s occurrence (count).</h3><h4 id="Example"><a href="#Example" class="headerlink" title="Example"></a>Example</h4><pre><code class="js">[
    { language: &#39;JavaScript&#39; },{ language: &#39;JavaScript&#39; },{ language: &#39;TypeScript&#39; },
] 
</code></pre>
<h4 id="SHOULD-BE-CONVERTED-TO"><a href="#SHOULD-BE-CONVERTED-TO" class="headerlink" title="SHOULD BE CONVERTED TO ="></a>SHOULD BE CONVERTED TO =</h4><pre><code class="js">[
{ language: &#39;JavaScript&#39;, count: 2 },
{ language: &#39;C++&#39;, count: 1 },
{ language: &#39;TypeScript&#39;, count: 1 }
]
</code></pre>
<h5 id="The-idea-is-to-count-the-frequency-of-each-unique-key-in-an-array-of-objects-and-then-instead-of-making-the-result-look-like"><a href="#The-idea-is-to-count-the-frequency-of-each-unique-key-in-an-array-of-objects-and-then-instead-of-making-the-result-look-like" class="headerlink" title="The idea is to count the frequency of each unique key in an array of objects and then instead of making the result look like"></a>The idea is to count the frequency of each unique key in an array of objects and then instead of making the result look like</h5><pre><code class="js">{ key1: 2, key2: 1, key3: 7 } 
</code></pre>
<p>The result should be an array of objects so that it can be map over and get rendered in React.JS or something like that.</p>
<pre><code class="js">[ { key1: 2 }, { key2: 1 }, { key3: 7 } ]
</code></pre>
